#ifndef SCENE_H
#define SCENE_H

#include "Image.h"
#include "Phong.h"
#include "parametrage.h"

class Scene
{
private:
	Observer *obs;
	Color background;
	vector<Object *> objects;
	vector<Light *> lights;
	int w,h;
	Color ambient;
public:
	Scene(Observer *o, Color b, int w, int h, Color a)
	{	
		obs=o;
		background=b;
		this->w=w;
		this->h=h;
		ambient = a;
	}

	Observer getObserver() { return *obs; }

	Color getBackground() {return background;}

	Color getAmbient() { return ambient; }

	void addObject(Object *s) { objects.push_back(s); }
	vector<Object *> getObjects () { return objects; }
	void del() { objects.clear(); }

	void addLight(Light *l) { lights.push_back(l); }
	vector<Light *> getLights () { return lights; }

	void traceRay(Image&);
	void traceRayAdaptatif(Image&);
	Color PixelColor(float x1, float y1, Color& color1, float x2, float y2, Color& color2, int iteration, Matrix& changement);
};

#endif
